import configparser
from os.path import dirname, join


def get_config(section):
    cfg_file_path = join(dirname(__file__), 'netconfig.ini')
    config = configparser.ConfigParser()
    config.read(cfg_file_path, 'utf8')
    ip = config.get(section, 'ip')
    port = config.get(section, 'port')
    return ip, int(port)
